package com.easyfile.easyfilemaster.entity.dto;

import com.easyfile.easyfilemaster.entity.base.ValidateRegex;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author chenpeman
 * @date 2022年05月26日 9:41
 */
@Data
public class UpdateUserPasswordDto {
    private Long userId;

    @NotBlank(message = "请输入旧密码")
    @Pattern(regexp = ValidateRegex.PASSWORD,message = "请输入正确的原密码")
    private String previousPassword;

    @NotBlank(message = "请输入新密码")
    @Pattern(regexp = ValidateRegex.PASSWORD,message = "新密码不合法")
    private String newPassword;
}
